<template>
    <el-dialog v-if="dialogVisible" :close-on-click-modal='false' title="图片" :visible.sync="dialogVisible" @close="resetForm()" width="400px">
        <div class="video_box">
            <el-carousel height="500px" :autoplay='false' trigger="click" class="picture_carousel">
                <el-carousel-item v-for="(img,index) in url" :key="index">
                    <div class="view_img flexbox flexcenter flexjust">
                        <img :src="img.url" alt="" class="material_img_big">
                        <img :src="img.url" alt="" class="material_img_small">
                    </div>
                </el-carousel-item>
            </el-carousel>
        </div>
        <span slot="footer" class="dialog-footer">
            <el-button size="small" type="primary" @click="resetForm('addAuthForm')" :loading="loading" class="el-button-width">关 闭</el-button>
        </span>
    </el-dialog>
</template>

<script>
export default {
    name: "",
    data() {
        return {
            loading: false,
            dialogVisible: false,
            url: [],
        };
    },
    created() {
        this.$bus.on("playPicture", (value) => {
            this.dialogVisible = value.dialogVsb;
            this.url = value.url;
        });
    },
    methods: {
        // 关闭重置表单
        resetForm() {
            this.dialogVisible = false;
            this.url = [];
        },
    },
    components: {},
};
</script>


<style scoped>
.video_box {
    position: relative;
    height: 500px;
    background-color: rgba(0, 0, 0, 0.2);
}
.view_img{
    position: relative;
    width: 100%;
    height: 100%;
}
</style>
